﻿using System;

namespace HYCodeBase.ObjectPersistentSuit
{
	[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
	public sealed class ObjectSerializeAttribute : Attribute
	{
		public ITransformerTag UseTransformer
		{
			get
			{
				return this.m_UseTransformer;
			}
			private set
			{
				this.m_UseTransformer = value;
			}
		}

		public Type ThisType
		{
			get
			{
				return this.m_thisType;
			}
			set
			{
				this.m_thisType = value;
				try
				{
					this.m_UseTransformer = (Activator.CreateInstance(this.m_thisType) as ITransformerTag);
				}
				catch (Exception)
				{
				}
			}
		}

		private ITransformerTag m_UseTransformer;

		private Type m_thisType;
	}
}
